ab -n 100 -g 100_req_seq.txt -v 2 http://localhost:8000/ > 100_req_seq_verbose.txt
grep HTTP 100_req_seq_verbose.txt > 100_req_seq_v.txt
grep Total: 100_req_seq_verbose.txt > 100_req_seq_v2.txt
rm -f 100_req_seq_verbose.txt 

ab -n 100 -c 5 -g 100_req_5_cur.txt -v 2 http://localhost:8000/ > 100_req_5_cur_verbose.txt
grep HTTP 100_req_5_cur_verbose.txt > 100_req_5_cur_v.txt
grep Total: 100_req_5_cur_verbose.txt > 100_req_5_cur_v2.txt
rm -f 100_req_5_cur_verbose.txt

ab -n 100 -c 20 -g 100_req_20_cur.txt -v 2 http://localhost:8000/ > 100_req_20_cur_verbose.txt
grep HTTP 100_req_20_cur.txt > 100_req_20_cur_v.txt
grep Total: 100_req_20_cur.txt > 100_req_20_cur_v2.txt
rm -f 100_req_20_cur_verbose.txt

ab -n 1000 -g 1000_req_seq.txt -v 2 http://localhost:8000/ > 1000_req_seq_verbose.txt
grep HTTP 1000_req_seq_verbose.txt > 1000_req_seq_v.txt
grep Total: 1000_req_seq_verbose.txt > 1000_req_seq_v2.txt
rm -f 1000_req_seq_verbose.txt

ab -n 1000 -c 5 -g 1000_req_5_cur.txt -v 2 http://localhost:8000/ > 1000_req_5_curr_verbose.txt
grep HTTP 1000_req_5_curr_verbose.txt > 1000_req_5_cur_v.txt
grep Total: 1000_req_5_curr_verbose.txt > 1000_req_5_cur_v2.txt
rm -f 1000_req_5_curr_verbose.txt

ab -n 1000 -c 20 -g 1000_req_20_cur.txt -v 2 http://localhost:8000/ > 1000_req_20_curr_verbose.txt
grep HTTP 1000_req_20_curr_verbose.txt > 1000_req_20_cur_v.txt
grep Total: 1000_req_20_curr_verbose.txt > 1000_req_20_cur_v2.txt
rm -f 1000_req_20_curr_verbose.txt

ab -n 10000 -g 10000_req_seq.txt -v 2 http://localhost:8000/ > 10000_req_seq_verbose.txt
grep HTTP 10000_req_seq_verbose.txt > 10000_req_seq_v.txt
grep Total: 10000_req_seq_verbose.txt > 10000_req_seq_v2.txt
rm -f 10000_req_seq_verbose.txt

ab -n 10000 -c 5 -g 10000_req_5_cur.txt -v 2 http://localhost:8000/ > 10000_req_5_cur_verbose.txt
grep HTTP 10000_req_5_cur_verbose.txt > 10000_req_5_cur_v.txt
grep Total: 10000_req_5_cur_verbose.txt > 10000_req_5_cur_v2.txt
rm -f 10000_req_5_cur_verbose.txt

ab -n 10000 -c 20 -g 10000_req_20_cur.txt -v 2 http://localhost:8000/ > 10000_req_20_cur_verbose.txt
grep HTTP 10000_req_20_cur_verbose.txt > 10000_req_20_cur_v.txt
grep Total: 10000_req_20_cur_verbose.txt > 10000_req_20_cur_v2.txt
rm -f 10000_req_20_cur_verbose.txt

for file in `ls -1 | grep -v v | grep -v sh | grep -v p`
do
    python Qps.py -f [[ -f $file ]] 
done

gnuplot plot_latency.p
gnuplot plot_qps.p
